import os, subprocess, sys
succ_seeds = {
    # "vi" : [0, 1, 6, 10],
    # "vi" : range(10), 
    "vi" : [6], 
    "tr" : [1, 2, 4, 5, 6, 8, -1],
}
if __name__ == '__main__':
    src = sys.argv[1]
    trg = sys.argv[2]
    # seeds = succ_seeds[src] if src in succ_seeds else range(-1, 11)
    # seeds = [0]
    exp_name = 'Sep07_stepdismostfreq'
    exp_id = src + '-' + trg
    for dis_most_frequet in range(20000, 200001, 20000):
        subprocess.run([
            "python3", "muse_main.py", 
            "--src_lang", src,
            "--tgt_lang", trg,
            "--src_emb", "data/wiki." + src + ".vec",
            "--tgt_emb", "data/wiki." + trg + ".vec",
            "--n_refinement", "5",
            "--n_adversarials", "1",
            # "--use_sdi",
            # "--n_epochs", "5",
            # "--epoch_size", "1000000",
            # "--map_optimizer", "sgd,lr=0.02",
            # "--dis_optimizer", "sgd,lr=0.02",
            # "--batch_size", "128",
            "--max_vocab", "200000",
            "--dis_most_frequent", str(dis_most_frequet),
            # "--exp_id", "jul29_renorm",
            "--exp_name", exp_name, 
            "--exp_id", exp_id, 
            "--normalize_embeddings", "center",
            "--seed", "6",
            # "--load_temp_model", "~/Documents/MI_Tlab/CUWTr/dumped/debug/jul25_19_32/"
            # "--dico_eval", "./datasets/crosslingual/dictionaries/en-es.txt"
            "--cuda", sys.argv[3],

        ])